/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package gestion;
import interfaz.InterfaceEjp;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;

public class GestionSpring {

    private static final String APPLICATION_CONTEXT_FILE =  "src/configuracion/applicationContext.xml";
    public static ApplicationContext contexto;
    private static GestionSpring gestionSpring;
    public static GestionSpring getSingleton(){
        if (null==gestionSpring)
        {
            gestionSpring= new GestionSpring();

        }
        return gestionSpring;
    }
 public GestionSpring(){
     contexto = new FileSystemXmlApplicationContext(APPLICATION_CONTEXT_FILE);
 }
 public  InterfaceEjp MetodoGestion(){
        return (InterfaceEjp)contexto.getBean("InterfaceEjp");
        }

   
}